#include <stdio.h>
#define NUMBERSTUDENTS 5
#define NUMBERQUARTERS 3

int main(){
	int a[NUMBERSTUDENTS][NUMBERQUARTERS];
	int i, j, med = 0;

	system("clear");

	for(i = 0; i < NUMBERSTUDENTS; i++){
		for(j = 0; j < NUMBERQUARTERS; j++){
			a[i][j]=0;
		}
	}

	for(i = 0; i < NUMBERSTUDENTS; i++){
		for(j = 0; j < NUMBERQUARTERS; j++){
			printf("Students %d, quarter %d, note %d\n", i + 1, j + 1, a[i][j]);
		}
	}

	for(i = 0; i < NUMBERSTUDENTS; i++){
		for(j = 0; j < NUMBERQUARTERS; j++){
			printf(" Enter the students %d, quarter %d, note:", i + 1, j + 1);
			scanf("%d", &a[i][j]);
		}
	}
	for(i = 0; i < NUMBERSTUDENTS; i++){
		for(j = 0; j < NUMBERQUARTERS; j++){
			printf("Students %d, quarter %d, note %d\n", i + 1, j + 1, a[i][j]);
			med = med + a[i][j];
		}
		printf("Students %d, medium of note: %d\n\n", i + 1, med / NUMBERQUARTERS);
		med = 0;
	}

}
